﻿using System;
using System.Collections.Generic;
using System.Linq;
using Portal.Data.Config;
using Portal.Data.Entity;
using Portal.Data.Webparts;

public partial class Webparts_Templates_truyen_ListHotSlide : WebpartControl
{
    public override WebpartConfig NewConfig
    {
        get { return new GetMaxConfig(); }
    }

    public GetMaxConfig PartConfig
    {
        get { return (GetMaxConfig)Config; }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            var all = new List<Book>();
            all.AddRange(Book.FindHots(0));
            all.AddRange(Book.FindHots(1));
            Items.DataSource = all;
            Items.DataBind();
        }
    }
}